package com.duoec.magichour.core.web;

import com.duoec.magichour.dto.UserInfo;

/**
 * Created by ycoe on 17/6/29.
 */
public class UserInfoHolder {
    private static final ThreadLocal<UserInfo> USER_INFO_THREAD_LOCAL = new ThreadLocal<>();

    public static void set(UserInfo userInfo) {
        USER_INFO_THREAD_LOCAL.set(userInfo);
    }

    public static UserInfo get() {
        return USER_INFO_THREAD_LOCAL.get();
    }
}
